/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package erp.apresentacao.internal;

import erp.apresentacao.JFramePrincipal;
import java.awt.Component;
import java.awt.ComponentOrientation;
import java.awt.Frame;
import java.util.logging.Level;
import org.jdesktop.swingx.error.ErrorInfo;
import system.MessagemErro;

/**
 *
 * @author Ícaro
 */
public class InternalFrameMenuOperacoesCadastro extends javax.swing.JInternalFrame {

    /**
     * Creates new form InternalFrameMenuOperacoesCadastro
     */
    public InternalFrameMenuOperacoesCadastro() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jSeparator1 = new javax.swing.JSeparator();
        linkOperacoesCadastroEntidade = new org.jdesktop.swingx.JXHyperlink();
        jLabel2 = new javax.swing.JLabel();
        linkOperacoesCadastroEntidade1 = new org.jdesktop.swingx.JXHyperlink();
        linkOperacoesCadastroEntidade2 = new org.jdesktop.swingx.JXHyperlink();
        linkOperacoesCadastroEntidade3 = new org.jdesktop.swingx.JXHyperlink();
        linkOperacoesCadastroEntidade4 = new org.jdesktop.swingx.JXHyperlink();
        jLabel3 = new javax.swing.JLabel();
        linkOperacoesCadastroEntidade5 = new org.jdesktop.swingx.JXHyperlink();
        linkOperacoesCadastroEntidade6 = new org.jdesktop.swingx.JXHyperlink();
        jLabel4 = new javax.swing.JLabel();
        linkOperacoesCadastroEntidade7 = new org.jdesktop.swingx.JXHyperlink();

        jScrollPane1.setBorder(null);

        jPanel1.setBackground(new java.awt.Color(255, 255, 204));

        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/erp/figuras/internal/menu/IcoTitleMenu.png"))); // NOI18N
        jLabel1.setText("Operações Cadastrais.");

        linkOperacoesCadastroEntidade.setIcon(new javax.swing.ImageIcon(getClass().getResource("/erp/figuras/internal/menu/IcoTitleSubMenu.png"))); // NOI18N
        linkOperacoesCadastroEntidade.setText("Entidades");
        linkOperacoesCadastroEntidade.setUnclickedColor(new java.awt.Color(153, 0, 153));
        linkOperacoesCadastroEntidade.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                linkOperacoesCadastroEntidadeActionPerformed(evt);
            }
        });

        jLabel2.setText("Pessoas:");

        linkOperacoesCadastroEntidade1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/erp/figuras/internal/menu/IcoTitleSubMenu.png"))); // NOI18N
        linkOperacoesCadastroEntidade1.setText("Empresas");
        linkOperacoesCadastroEntidade1.setUnclickedColor(new java.awt.Color(153, 0, 153));
        linkOperacoesCadastroEntidade1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                linkOperacoesCadastroEntidade1ActionPerformed(evt);
            }
        });

        linkOperacoesCadastroEntidade2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/erp/figuras/internal/menu/IcoTitleSubMenu.png"))); // NOI18N
        linkOperacoesCadastroEntidade2.setText("Funcionarios");
        linkOperacoesCadastroEntidade2.setUnclickedColor(new java.awt.Color(153, 0, 153));
        linkOperacoesCadastroEntidade2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                linkOperacoesCadastroEntidade2ActionPerformed(evt);
            }
        });

        linkOperacoesCadastroEntidade3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/erp/figuras/internal/menu/IcoTitleSubMenu.png"))); // NOI18N
        linkOperacoesCadastroEntidade3.setText("Pessoa Física");
        linkOperacoesCadastroEntidade3.setUnclickedColor(new java.awt.Color(153, 0, 153));
        linkOperacoesCadastroEntidade3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                linkOperacoesCadastroEntidade3ActionPerformed(evt);
            }
        });

        linkOperacoesCadastroEntidade4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/erp/figuras/internal/menu/IcoTitleSubMenu.png"))); // NOI18N
        linkOperacoesCadastroEntidade4.setText("Pessoa Jurídica");
        linkOperacoesCadastroEntidade4.setUnclickedColor(new java.awt.Color(153, 0, 153));
        linkOperacoesCadastroEntidade4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                linkOperacoesCadastroEntidade4ActionPerformed(evt);
            }
        });

        jLabel3.setText("Outros:");

        linkOperacoesCadastroEntidade5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/erp/figuras/internal/menu/IcoTitleSubMenu.png"))); // NOI18N
        linkOperacoesCadastroEntidade5.setText("Estados");
        linkOperacoesCadastroEntidade5.setUnclickedColor(new java.awt.Color(153, 0, 153));
        linkOperacoesCadastroEntidade5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                linkOperacoesCadastroEntidade5ActionPerformed(evt);
            }
        });

        linkOperacoesCadastroEntidade6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/erp/figuras/internal/menu/IcoTitleSubMenu.png"))); // NOI18N
        linkOperacoesCadastroEntidade6.setText("Municípios");
        linkOperacoesCadastroEntidade6.setUnclickedColor(new java.awt.Color(153, 0, 153));
        linkOperacoesCadastroEntidade6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                linkOperacoesCadastroEntidade6ActionPerformed(evt);
            }
        });

        jLabel4.setText("Relacionadores:");

        linkOperacoesCadastroEntidade7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/erp/figuras/internal/menu/IcoTitleSubMenu.png"))); // NOI18N
        linkOperacoesCadastroEntidade7.setText("Tipo Entidade");
        linkOperacoesCadastroEntidade7.setUnclickedColor(new java.awt.Color(153, 0, 153));
        linkOperacoesCadastroEntidade7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                linkOperacoesCadastroEntidade7ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jSeparator1)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel1)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGap(10, 10, 10)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addGap(10, 10, 10)
                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(linkOperacoesCadastroEntidade6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(linkOperacoesCadastroEntidade5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))))
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(linkOperacoesCadastroEntidade1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(linkOperacoesCadastroEntidade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(linkOperacoesCadastroEntidade2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(linkOperacoesCadastroEntidade3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(linkOperacoesCadastroEntidade4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(74, 74, 74)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addComponent(linkOperacoesCadastroEntidade7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(601, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(linkOperacoesCadastroEntidade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel4)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(linkOperacoesCadastroEntidade7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(linkOperacoesCadastroEntidade1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(linkOperacoesCadastroEntidade2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(linkOperacoesCadastroEntidade3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(linkOperacoesCadastroEntidade4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel3)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(linkOperacoesCadastroEntidade5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(linkOperacoesCadastroEntidade6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(315, Short.MAX_VALUE))
        );

        jScrollPane1.setViewportView(jPanel1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 553, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void linkOperacoesCadastroEntidadeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_linkOperacoesCadastroEntidadeActionPerformed
        try {

            /* Fecha o Internal Aberto */
            this.setClosed(true);

            /* Captura o Frame e inicial um novo InternalFarme */
            Frame[] frame = JFramePrincipal.getFrames();
            JFramePrincipal f = (JFramePrincipal) frame[1];
            f.showInternalFrame(new InternalFrameEntidade());

        } catch (Exception e) {
            MessagemErro erro = new MessagemErro(new ErrorInfo("Erro no Sistema", "Não é Possível Continuar, Sistema Inativo", null, "Fatal", e, Level.WARNING, null), 1);
        }
    }//GEN-LAST:event_linkOperacoesCadastroEntidadeActionPerformed

    private void linkOperacoesCadastroEntidade1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_linkOperacoesCadastroEntidade1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_linkOperacoesCadastroEntidade1ActionPerformed

    private void linkOperacoesCadastroEntidade2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_linkOperacoesCadastroEntidade2ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_linkOperacoesCadastroEntidade2ActionPerformed

    private void linkOperacoesCadastroEntidade3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_linkOperacoesCadastroEntidade3ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_linkOperacoesCadastroEntidade3ActionPerformed

    private void linkOperacoesCadastroEntidade4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_linkOperacoesCadastroEntidade4ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_linkOperacoesCadastroEntidade4ActionPerformed

    private void linkOperacoesCadastroEntidade5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_linkOperacoesCadastroEntidade5ActionPerformed
        try {

            /* Fecha o Internal Aberto */
            this.setClosed(true);

            /* Captura o Frame e inicial um novo InternalFarme */
            Frame[] frame = JFramePrincipal.getFrames();
            JFramePrincipal f = (JFramePrincipal) frame[1];
            f.showInternalFrame(new InternalFrame());

        } catch (Exception e) {
            MessagemErro erro = new MessagemErro(new ErrorInfo("Erro no Sistema", "Não é Possível Continuar, Sistema Inativo", null, "Fatal", e, Level.WARNING, null), 1);
        }
    }//GEN-LAST:event_linkOperacoesCadastroEntidade5ActionPerformed

    private void linkOperacoesCadastroEntidade6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_linkOperacoesCadastroEntidade6ActionPerformed
        
    }//GEN-LAST:event_linkOperacoesCadastroEntidade6ActionPerformed

    private void linkOperacoesCadastroEntidade7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_linkOperacoesCadastroEntidade7ActionPerformed
        try {

            /* Fecha o Internal Aberto */
            this.setClosed(true);

            /* Captura o Frame e inicial um novo InternalFarme */
            Frame[] frame = JFramePrincipal.getFrames();
            JFramePrincipal f = (JFramePrincipal) frame[1];
            f.showInternalFrame(new InternalFrameTipoEntidade());

        } catch (Exception e) {
            MessagemErro erro = new MessagemErro(new ErrorInfo("Erro no Sistema", "Não é Possível Continuar, Sistema Inativo", null, "Fatal", e, Level.WARNING, null), 1);
        }
    }//GEN-LAST:event_linkOperacoesCadastroEntidade7ActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JSeparator jSeparator1;
    private org.jdesktop.swingx.JXHyperlink linkOperacoesCadastroEntidade;
    private org.jdesktop.swingx.JXHyperlink linkOperacoesCadastroEntidade1;
    private org.jdesktop.swingx.JXHyperlink linkOperacoesCadastroEntidade2;
    private org.jdesktop.swingx.JXHyperlink linkOperacoesCadastroEntidade3;
    private org.jdesktop.swingx.JXHyperlink linkOperacoesCadastroEntidade4;
    private org.jdesktop.swingx.JXHyperlink linkOperacoesCadastroEntidade5;
    private org.jdesktop.swingx.JXHyperlink linkOperacoesCadastroEntidade6;
    private org.jdesktop.swingx.JXHyperlink linkOperacoesCadastroEntidade7;
    // End of variables declaration//GEN-END:variables
}
